package main

import (
	"gitee.com/crack007/go_web"
	"github.com/crack007/fpm_metrics/src/config"
	"github.com/crack007/fpm_metrics/src/monitor"
	"github.com/crack007/fpm_metrics/src/register"
	"github.com/crack007/fpm_metrics/src/service"
)

func main() {
	cmd := go_web.NewCmd()
	cmd.InitConfig = func(app *go_web.CmdCore) {
		config.InitConfig()
	}
	cmd.Bootstrap(func(c *go_web.CmdCore) {
		register.ServiceRegister()
		register.PrometheusRegister()
		go monitor.NewPrometheus()
		go service.GetScheduleService().Bootstrap(c.Ctx)
	})
}
